mongomapper, rails3 edge: undefined method `to_key' on form_for

Posted by z3cko on Stack Overflow See other posts from Stack Overflow or by z3cko
Published on 2010-03-16T09:08:49Z Indexed on 2010/03/16 9:16 UTC
Read the original article Hit count: 649

Filed under:
|
|

when i am trying to get the basic devise examples running with current git versions from rails, mongomapper and devise, i have the following error appearing:

undefined method `to_key' for #<Admin:0x23dee04> 

here is my actual source:

4: = form_for @admin, :url => admins_path do |f| 
5:   - field_set_tag 'Update my email' do 
6:     %p= f.text_field :email 
7:     %p= error_message_on @admin, :email 

@admin is the currently logged in user (@admin= current_admin) the same error occurs when trying to use @admin=Admin.first in the controller

i am not quite sure if this is a mongomapper problem, might also be rails3 related... thanks for any pointers...

© Stack Overflow or respective owner

Related posts about mongomapper

Related posts about rails3